<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../../vue/vue.js"></script>
    <title>Document</title>
</head>

<body>
    <div id="app">
        <div>
            {{msg1}}
            <input v-model="msg1" type="text">
        </div>
        <div>
            {{msg2}}
            <input type="text" v-model.lazy="msg2">
        </div>
        <div>
            <p>msg的数据类型是{{typeof msg3}}</p>
            {{msg3}}
            <input type="text" v-model.number="msg3">
        </div>
        <div>
            <!-- <p>msg的数据类型是{{typeof msg4}}</p> -->
            {{msg4}}
            <input type="text" v-model.trim="msg4">
        </div>

        <div>
            {{sex}}
            <br>
            <label for=""><input type="radio" name="sex" v-model="sex" value="male"> male</label>
            <label for=""><input type="radio" name="sex" v-model="sex" value="female"> female</label>
            <label for=""><input type="radio" name="sex" v-model="sex" value="undefined"> undefined</label>


        </div>

        <div>
            {{hobby}}
            <br>
            <label for=""><input type="checkbox" name="hobby" v-model="hobby" value="Singing">Singing</label>
            <label for=""><input type="checkbox" name="hobby" v-model="hobby" value="Dancing">Dancing</label>
            <label for=""><input type="checkbox" name="hobby" v-model="hobby" value="Rap">Rap</label>
        </div>

        <div>
            选择你的性别是：{{sex}}
            <label v-for="item in sexArr"><input v-model="sex" :type="item.type" :name="item.name" :value="item.value">
                {{item.label}}</label>
        </div>


    </div>

    <!-- <div>
        <textarea name="desc" v-model="desc" rows="10" cols="30"></textarea>
    </div> -->

</body>
<script>
    new Vue({
        el: "#app",
        data() {
            return {
                msg1: "Hello World!",
                msg2: "Hello World!",
                msg3: "Hello World!",
                msg4: "Hello World!",

                sex: "",
                hobby: ["Singing", "Dancing", "Rap"],
                desc: "",
                sexArr: [
                    {
                        type: "radio",
                        name: "Worrdy",
                        value: "0",
                        label: "funk"
                    },
                    {
                        type: "radio",
                        name: "Queem",
                        value: "1", 
                        label: "funk"

                    }, {
                        type: "radio",
                        name: "Hearvey",
                        value: "1", 
                        label: "funk"

                    },
                ]
            }

        }
    })
</script>

</html>